﻿$(function () {
    $('.currency-pnl').dialog({
        autoOpen: false,
        modal: true,
        buttons: [

    {
        text: 'anuluj',
        click: function () { $(this).dialog("close"); }
    }
        ],
        resizable: false,
        title: 'Zmień domyślną walutę'
    });
    $('.cur-line,.to-curr').click(function (e) {
        e.stopPropagation();
        e.preventDefault();

        $('<input />').attr('type', 'hidden')
.attr('name', 'SetCurrency')
.val($(this).attr('currency')).appendTo($('form'));
        $('form').submit();
    });



    $('.currency-value').css('cursor', 'pointer').click(function (e) {
        e.preventDefault();
        e.stopPropagation();
        var dialog = $('#' + $(this).attr('dialog'));
        dialog.dialog('open');
    });
});
